package main

import (
	"fmt"
	"log"
	"net/rpc"
	"rpc_objects"
)

const serverAddr = "localhost"

func main() {
	client, err := rpc.DialHTTP("tcp", serverAddr+":1234")
	if err != nil {
		log.Fatal("Error Dialing:", err)
	}
	args := &rpc_objects.Args{25, 43}
	var rep int
	var RpcMethod string = "Args.Multiply"
	err = client.Call(RpcMethod, args, &rep)
	if err != nil {
		log.Fatal("Args error:", err)
	}
	fmt.Printf("Args: %d * %d = %d\n", args.N, args.M, rep)

}
